#ifndef IMAGEGRAPHICSITEM_H
#define IMAGEGRAPHICSITEM_H
#include <QGraphicsItem>
#include <QPainter>
#include <QWidget>
#include <QObject>
#include "lockimage.h"

class ImageGraphicsItem : public QObject, public QGraphicsItem
{
    Q_OBJECT
public:
    explicit ImageGraphicsItem(int id);
    ~ImageGraphicsItem();

    QRectF boundingRect() const Q_DECL_OVERRIDE;
    void paint(QPainter *painter, const QStyleOptionGraphicsItem *item, QWidget *widget) Q_DECL_OVERRIDE;

    void setLockImage(LockImage *img);

private:
    bool mNeedUpate;
    LockImage *mLockImage;
    QImage mTempImage;
    int mId;
};

#endif // IMAGEGRAPHICSITEM_H
